package com.myteam.mystory.json;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class TestWifiConnected {
	private Context context;

	public TestWifiConnected(Context context) {
		super();
		this.context = context;
	}

	public boolean checkMobileInternetConnection() {
		ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo ni = connectivity.getActiveNetworkInfo();
		if(ni != null && ni.isConnected()){
			return true;
		}
		return false;
	}
}
